var mock = require('mockjs');

var obj = {'name':'zp','age':20, 'sex':'man'};

var arr = [1,2,3,4,5]

var foo = function(context){
    return 100;
}

var data = mock.mock({
    'list|3':[{
        'name0|10':'a',
        'name1|10':'b',
        'name2|5-10':'c',
        'age0|1-100.1-10':100,
        'age1|+1':100,
        'age2|1-100.2':100,
        'age3|100.10':100,
        'sex0|1':true,
        'sex1|1-10':true,
        'sex2|1-10':false,
        'obj0|2':obj,
        'obj1|1-3':obj,
        'arr0|1': arr,
        'arr1|2': arr,
        'arr2|1-2': arr,
        'fun0':foo,
    }]
});

var name = mock.mock({
    name: {
        first: '@FIRST',
        middle: '@FIRST',
        last: '@LAST',
        full:'@first @middle @last'
    }
});

console.log(JSON.stringify(data, null, 4));
console.log(JSON.stringify(name, null, 4));


